<?php
    session_start();
    unset($_SESSION['loguin']);
    // Borramos toda la sesion
    session_destroy();
?>
<SCRIPT LANGUAGE="javascript">
alert("Se ha cerrado la sesi&oacute;n satisfatoriamente");
location.href = "index.php";
</SCRIPT>